home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 079c.dms / 079c.adf / Iterface.lha / andy_smith / Interface_Example6.AMOS / Interface_Example6.amosSourceCode
AMOS Source Code  |  1992-03-06  |  2KB  |  59 lines

  1. '=========================================================================== 
  2. ' Interface example 6. 
  3.  
  4. ' Written by Andy Smith for Amoszine 
  5. '=========================================================================== 
  6.  
  7.  
  8. Resource Screen Open 0,640,256,0
  9. A$=A$+"BAse 200,100;"
  10. A$=A$+"SIze 250,50; SAve 1;"
  11. A$=A$+"BOx 0,0,1,250,50;"
  12. A$=A$+"PRint 10,2,'Enter some text below',7;"
  13.  
  14. ' The LIne command draws a line from graphic elements contained with the 
  15. ' resource bank.  Its parameters are as follows: 
  16.  
  17. ' The X coordinate 
  18. ' The Y coordinate 
  19. ' The image number from the resource bank
  20. ' The width of the line
  21.  
  22. A$=A$+"LIne 8,15,17,240;"
  23.  
  24. ' The EDit command follows below.  It sets up an edit zone where to can type 
  25. ' text.  The parameters are (in order):
  26.  
  27. ' Identification number which ranges from 1 upwards. 
  28. ' The X coordinate 
  29. ' The Y coordinate 
  30. ' The maximum amount of characters that can be displayed in the zone at once 
  31. ' The maximum amount of characters that can be entered 
  32. ' A string.  In this case 'Change me' is displayed.  This will be displayed
  33. '    when then the zone is first set up. 
  34. ' The paper colour 
  35. ' The pen colour 
  36.  
  37. A$=A$+"EDit 1,16,19,26,80,'Change me',0,7;"
  38.  
  39. A$=A$+"EXit;"
  40.  
  41. Dialog Open 1,A$
  42.  
  43. R=Dialog Run(1)
  44. Repeat 
  45.    BUTTON=Dialog(1)
  46. Until BUTTON<>0
  47.  
  48. ' The Rdialog$ function returns a string from a zone.  Its parameters are as 
  49. ' follows: 
  50.  
  51. ' The channel number 
  52. ' The zone.  Which corresponds to the interface program.  Zone 1 is the EDit 
  53. '    zone. 
  54.  
  55. MESSAGE$=Rdialog$(1,1)
  56.  
  57. Dialog Close 1
  58.  
  59. Print "You typed : ";MESSAGE$